
#*--encoding:UTF-8--*

'''
整理数据
'''

from common.helper import Helper
from db.mysql import MysqlClient
class Arrangement( object ):

    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "都会天使医疗保险"

    # 拉取数据
    def pullData(self, data={}):
        for item in Helper.selectData(self.name, self.mysql):
            data["name"] = self.name
            data["company"] = "大都会人寿"
            data["year"] = item["year"]
            data["socialSec"] = "Y" if item["socialSec"] == "P000000843" else "N"
            data["expire"] = "1年"
            data["money"] = "100w"
            data["interval"] = "1年"
            data["payType"] = "年缴"
            data["price"] = item["price"]
            Helper.mergeTable(self.name, self.mysql, data)